home *** CD-ROM | disk | FTP | other *** search
- Path: news.primenet.com!wisniew
- From: Joseph Wisniewski <wisniew@primenet.com>
- Newsgroups: comp.lang.c
- Subject: Re: Leap Years
- Date: 12 Mar 1996 11:07:01 -0700
- Organization: Primenet (602)395-1010
- Sender: root@primenet.com
- Message-ID: <4i4eg5$3v3@nnrp1.news.primenet.com>
- References: <8BA8405.02C70020E1.uuout@sourcebbs.com> <4h6ara$mu@netnews1.apci.com> <825684095snz@genesis.demon.co.uk> <4i0sd4$7lr@peachy.apana.org.au> <826593980snz@genesis.demon.co.uk>
- X-Posted-By: wisniew@usr2.primenet.com
-
- Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
- : In article <4i0sd4$7lr@peachy.apana.org.au>
- : grahamb@peachy.apana.org.au "Graham Broadbridge" writes:
-
- : >Lawrence Kirby (fred@genesis.demon.co.uk) wrote:
- : >: In article <4h6ara$mu@netnews1.apci.com> wardmw@apci.com "Martin Ward"
- : > writes:
- : >
- : >: >david.mohorn@sourcebbs.com (DAVID MOHORN) typed:
- : >: >
- : >: >>How do you feature out leap years? If its evenly divisible by 400 and
- : >: >>4?
-
- : Please take a little more care in trimming down your attributions.
-
- : >I can't believe that anyone here can get confused about this.
- : >
- : >isleap(int year)
- : >{
- : >if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
- : > printf("%d is a leap year", year);
- : >else
- : > printf("%d is not a leap year", year);
- : >}
-
- : Read the FAQ. The version it contains is slightly more efficient than this
- : one.
-
-
- Obviously too confusing for the software company that runs the
- Arizona lottery though. You guessed it, February 29th was an invalid
- date and no sales or drawing on that date
-
- ..: --
- : -----------------------------------------
- : Lawrence Kirby | fred@genesis.demon.co.uk
- : Wilts, England | 70734.126@compuserve.com
- : -----------------------------------------
-
- --
- Joe Wisniewski
- Commercial Software Solutions, Ltd. -- Embedded/RT SW Consulting
- Co-Author: Program Smarter, Not Harder - Get Mission Critical Projects
- Right the First Time ISBN 0-07-021232-5
-
- wisniew@primenet.com --- The "Baltimore Browns"? Pazhaloosta!
- Ada95 --> She'll take you to places you never thought possible!
-
-